﻿<layout name="layout" />
<div class="row">
  <!-- begin col-3 -->
  <div class="col-md-3 col-sm-6">
    <div class="widget widget-stats bg-green">
      <div class="stats-icon"><i class="fa fa-desktop"></i></div>
      <div class="stats-info">
        <h4>预约及上课次数</h4>
        <p>{$yuyuecount}</p>
      </div>
      <div class="stats-link">
        <a href="javascript:;">查看详细 <i class="fa fa-arrow-circle-o-right"></i></a>
      </div>
    </div>
  </div>
  <!-- end col-3 -->
  <!-- begin col-3 -->
  <div class="col-md-3 col-sm-6">
    <div class="widget widget-stats bg-blue">
      <div class="stats-icon"><i class="fa fa-chain-broken"></i></div>
      <div class="stats-info">
        <h4>候补预约人数</h4>
        <p>2000</p>
      </div>
      <div class="stats-link">
        <a href="javascript:;">查看详细 <i class="fa fa-arrow-circle-o-right"></i></a>
      </div>
    </div>
  </div>
  <!-- end col-3 -->
  <!-- begin col-3 -->
  <div class="col-md-3 col-sm-6">
    <div class="widget widget-stats bg-purple">
      <div class="stats-icon"><i class="fa fa-users"></i></div>
      <div class="stats-info">
        <h4>客户人数</h4>
        <p>{$membercount}</p>

      </div>
      <div class="stats-link">
        <a href="javascript:;">查看详细 <i class="fa fa-arrow-circle-o-right"></i></a>
      </div>
    </div>
  </div>
  <!-- end col-3 -->
  <div class="col-md-3 col-sm-6">
    <div class="widget widget-stats bg-green">
      <div class="stats-icon"><i class="fa fa-desktop"></i></div>
      <div class="stats-info">
             <h4>账户起止日期</h4>
        <p>2017-4-1 至 2018-8-1</p>
      </div>
      <div class="stats-link">
        <a href="javascript:;">查看详细 <i class="fa fa-arrow-circle-o-right"></i></a>
      </div>
    </div>
  </div>
  <div class="col-md-3 col-sm-6">
    <div class="widget widget-stats bg-green">
      <div class="stats-icon"><i class="fa fa-desktop"></i></div>
      <div class="stats-info">
        <h4>30天内过生日客户</h4>
        <p>{$memberbirthday}</p>
      </div>
      <div class="stats-link">
        <a href="javascript:;">查看详细 <i class="fa fa-arrow-circle-o-right"></i></a>
      </div>
    </div>
  </div>
  <div class="col-md-3 col-sm-6">
    <div class="widget widget-stats bg-green">
      <div class="stats-icon"><i class="fa fa-desktop"></i></div>
      <div class="stats-info">
        <h4>超过30天没来上课的会员</h4>
        <p>3</p>
      </div>
      <div class="stats-link">
        <a href="javascript:;">查看详细 <i class="fa fa-arrow-circle-o-right"></i></a>
      </div>
    </div>
  </div>
  <!-- begin col-3 -->
  <div class="col-md-3 col-sm-6">
    <div class="widget widget-stats bg-red">
      <div class="stats-icon"><i class="fa fa-clock-o"></i></div>
      <div class="stats-info">
        <h4>短信剩余条数</h4>
        <p>500</p>
      </div>
      <div class="stats-link">
        <a href="javascript:;">查看详细 <i class="fa fa-arrow-circle-o-right"></i></a>
      </div>
    </div>
  </div>
  <!-- end col-3 -->
</div>

<script src="http://cdn.static.runoob.com/libs/jquery/2.1.1/jquery.min.js"></script>
<script type="text/javascript" charset="utf-8" src="__PUBLIC__/datetimepicker/jquery-ui-1.9.2.custom.min.js"></script>
<script type="text/javascript" charset="utf-8" src="__PUBLIC__/datetimepicker/datepicker-zh_cn.js"></script>
<script type="text/javascript" src="__PUBLIC__/datetimepicker/time/jquery-ui-timepicker-addon.min.js"></script>


<!-- <script type="text/javascript" src="__PUBLIC__/datetimepicker/time/i18n/jquery-ui-timepicker-addon-i18n.min.js"></script> -->


<script src="__PUBLIC__/Common/html/assets/js/iziToast.min.js"></script>
<link href="__PUBLIC__/Common/html/assets/css/iziToast.min.css" rel="stylesheet" />
<script>
    $(document).ready(function() {
        setInterval("yuyuetixing()",5000)

    });
    iziToast.settings({
        timeout: 5000,
        // position: 'center',
        // imageWidth: 50,
        pauseOnHover: true,
        // resetOnHover: true,
        close: true,
        progressBar: true
        // layout: 1,
        // balloon: true,
        // target: '.target',
        // icon: 'material-icons',
        // iconText: 'face',
        // animateInside: false,
        // transitionIn: 'flipInX',
        // transitionOut: 'flipOutX',
    });

    function yuyuetixing()
    {


        $.post("{:U('Yuyue/info')}", {},
            function(data){
                if(data>0)
                {
//                    alert('有新的预约！');
                    iziToast.show({

                        title: '您好!',
                        icon: 'icon-drafts',
                        class: 'test',
                        color: 'dark',
                        message: '编号['+data+']新单是一个新的预约',
                        position: 'bottomRight',
                        progressBarColor: 'rgb(0, 255, 184)',
                        //image: 'img/avatar.jpg',
                        balloon: true,

//                        class: 'test',
//                        color: 'dark',
//                        icon: 'icon-contacts',
//                        title: '您好!',
//                        message: '编号['+data+']新单是一个新的预约',
//                        position: 'bottomRight',
//                        transitionIn: 'flipInX',
//                        transitionOut: 'flipOutX',
//                        progressBarColor: 'rgb(0, 255, 184)',
//                        //image: 'img/avatar.jpg',
//                        imageWidth: 70,
//                        layout:2,
//                        iconColor: 'rgb(0, 255, 184)',
                        buttons: [
                            ['<button>查看</button>', function (instance, toast) {

                                // instance.hide({ transitionOut: 'fadeOutUp' }, toast);

                                window.location.href="{:U('Yuyue/lst')}?id="+data;

                            }],


                        ]
                    });
                }
            }, "json");


    }


</script>